package cn.springcloud.alibaba.gateway.controller;

import cn.springcloud.alibaba.core.base.Result;
import cn.springcloud.alibaba.gateway.common.GwProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/public")
public class PublicController {

	@Autowired
	private GwProperties gwProperties;

	@GetMapping("/publicKey")
	public Result<String> getPublicKey() {
		return Result.success(gwProperties.getPublicKey());
	}
}
